import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const dashboard: AppRouteModule = {
  path: '/dashboard',
  name: '可视管理',
  component: LAYOUT,
  redirect: '/dashboard/analysis',
  meta: {
    orderNo: 10,
    icon: 'ion:grid-outline',
    title: t('routes.dashboard.dashboard'),
  },
  children: [
    {
      path: 'analysis',
      name: 'Analysis',
      component: () => import('/@/views/dashboard/Analysis/index.vue'),
      meta: {
        // affix: true,
        title: t('routes.dashboard.analysis'),
      },
    },
    {
      path: 'workbench',
      name: 'Workbench',
      component: () => import('/@/views/dashboard/workbench/index.vue'),
      meta: {
        title: t('routes.dashboard.workbench'),
      },
    },

    {
      path: 'safe',
      name: 'safe',
      component: () => import('/@/views/dashboard/safe/index.vue'),
      meta: {
        title: t('routes.dashboard.safe'),
      },
    },
    {
      path: 'user',
      name: 'user',
      component: () => import('/src/views/system/user/index.vue'),
      meta: {
        title: t('routes.dashboard.user'),
      },
    },
    {
      path: 'role',
      name: 'role',
      component: () => import('/@/views/system/role/index.vue'),
      meta: {
        title: t('routes.dashboard.user'),
      },
    },
  ],
};

export default dashboard;
